import 'dart:convert';

/// 职级类别
class Professional {
  String id, label, value, sort;

  Professional(this.id, this.label, this.value, this.sort);

  factory Professional.fromJson(Map<String, dynamic> data) {
    return Professional(
      data['id'],
      data['label'],
      data['value'],
      data['sort'],
    );
  }

  Map<String, dynamic> toMap() {
    return {
      'id': id,
      'label': label,
      'value': value,
      'sort': sort,
    };
  }

  @override
  String toString() {
    return json.encode(toMap());
  }
}
